/*
 * @Description: 
 * @Version: 2.0
 * @Autor: ftt
 * @Date: 2022-06-11 10:09:31
 * @LastEditors: ftt
 * @LastEditTime: 2022-06-14 17:14:02
 */
import 'dart:convert';
import 'package:flutter/material.dart';

class UserModel {
  UserModel({
    this.nickname,
    this.pwd,
  });

  /// 昵称
  String? nickname;

  /// 密码
  String? pwd;

  factory UserModel.fromJson(String str) => UserModel.fromMap(json.decode(str));

  String toJson() => json.encode(toMap());

  factory UserModel.fromMap(Map<dynamic, dynamic> json) => UserModel(
        nickname: json["nickname"],
        pwd: json["pwd"],
      );

  Map<String, dynamic> toMap() => {
        "nickname": nickname,
        "pwd": pwd,
      };
}
